import java.util.Arrays;

/**
 * Created by Salted fish
 * Description:
 * User: 24539
 * Date：2021-08-03
 * Time: 21:39
 */
public class Test2 {
    public static void main(String[] args) {
            int[] a = {1, 3, 5};
            int[] b = {2, 4, 6};
            swap(a, b);
        }
        public static void swap( int[] a, int[] b){
            for (int i = 0; i < a.length; i++) {
                int temp = a[i];
                a[i] = b[i];
                b[i] = temp;
            }
            System.out.println("a:" + Arrays.toString(a));
            System.out.println("b:" + Arrays.toString(b));
        }
    }
